from base_restful.order import create_order_pc_activtiy
from base_restful.crm import login_pc, login_app
from base_restful.order import order_sales_confirm_receipt
from base_restful.const import BaseInfo

from base_restful.http_utils import *
from run import run_activity_order_test


# 开发环境
# BaseInfo.active = 'dev'
# login_pc('hh001', '123456')
# login_app('13381102960', '123456')

# 灰度环境
# BaseInfo.active = 'backup'
# login_pc('hh001', '123456')
# login_app('13718200465', '123456')
# print(order_sales_confirm_receipt("DD20180928190096373"))

# 测试环境
BaseInfo.active = 'test'
# pc登录指的平台
login_pc('fj010', '123456')
# app的登录
login_app('10', '123456')

# 创建订单及完整流程
run_activity_order_test()

# 切换到app登录
# BaseInfo.login.change_app()

# 切换到pc登录
# BaseInfo.login.change_pc()

# 调用本地接口的时候需要开启这个
# BaseInfo.set_header = True
# 调用本地接口示例
# print(http_post_json("http://10.129.83.117:8081/finance//offlineOrder/createReceiptBillAllOrder",
#                      {
#                          "garageId": "27765e7aeca5413aa2feb4342d1b8307"
#                      }
#                      ))







